package com.gitee.cashzhang27.test.cloud.seata.storage.controller;

import com.gitee.cashzhang27.test.cloud.seata.storage.service.StorageService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description：
 *
 * @author fangliangsheng
 * @date 2019/3/28
 */
@RestController
@AllArgsConstructor
public class StorageController {

  private StorageService storageService;

  @GetMapping(path = "/deduct")
  public Boolean deduct(String commodityCode, Integer count) {
    storageService.deduct(commodityCode, count);
    return true;
  }
}
